package com.lfy.modules.blog.domain.dto.article;

import com.lfy.modules.blog.domain.group.SaveGroup;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
public class ArticleDTO {
    @Null(message = "id不能存在",groups = {SaveGroup.class})
    private Long id;
    @NotBlank(message = "标题不能为空",groups = {SaveGroup.class})
    private String title;
    @NotBlank(message = "展示内容不能为空",groups = {SaveGroup.class})
    private String content;
    @NotBlank(message = "分类不能为空",groups = {SaveGroup.class})
    private String category;
    @NotBlank(message = "标签不能为空",groups = {SaveGroup.class})
    private String tags;
    @NotBlank(message = "全部内容不能为空",groups = {SaveGroup.class})
    private String allContent;
    @NotNull(message = "图片不能为空",groups = {SaveGroup.class})
    private MultipartFile imgFile;
    private Integer recommend;
    @NotNull(message = "状态不能为空",groups = {SaveGroup.class})
    private Integer status;
}
